import com.beans.UserController;
import com.beans.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-confilg.xml");
//        UserController controller = applicationContext.getBean("userController",UserController.class);
//        controller.sayHi();
        UserService service = applicationContext.getBean("userService",UserService.class);
        service.sayHi();
    }
}
